Method and system for providing highly available services based on a load balancing policy and a reusable connection context object

ABSTRACT

An example of a solution provided here comprises: providing a connection pool, said connection pool including a connection for each of a plurality of servers; applying a load-balancing policy to said connection pool; and assigning a connection from said connection pool to a client, according to said load-balancing policy. Another example of a solution comprises: providing a plurality of directory servers; providing a connection pool, said connection pool including a connection for each of said plurality of directory servers; applying a load-balancing policy to said connection pool; and assigning a connection from said connection pool to a client, according to said load-balancing policy. Methods for providing highly available services, systems for executing such methods, and instructions on a computer-usable medium, for executing such methods, are provided.

COPYRIGHT NOTICE

A portion of the disclosure of this patent document contains materialwhich is subject to copyright protection. The copyright owner has noobjection to the facsimile reproduction by anyone of the patent documentor the patent disclosure, as it appears in the Patent and TrademarkOffice patent file or records, but otherwise reserves all copyrightrights whatsoever.

FIELD OF THE INVENTION

The present invention relates generally to information handling, andmore particularly to methods and systems to provide highly availableservices.

BACKGROUND OF THE INVENTION

Various approaches have been proposed for improving the performance ofclient-server applications. Examples include U.S. Pat. No. 6,105,067(Batra, Connection Pool Management for Backend Servers Using CommonInterface, Aug. 15, 2000), U.S. Pat. No. 6,356,930 (Garg, ConnectionConcentrator for Distributed Object Systems, Mar. 12, 2002), and U.S.Pat. No. 5,553,242 (Russell, Client/Server Connection Sharing, Sep. 3,1996). However, these patents addresses substantially different problems(such as limiting the number of connections to a client or server), andthus are significant different from the present invention. Otherexamples include an article by Kevin O'Malley, “Agents & AutomatedOnline Trading: The TAC Game System Takes Care of Business,” Dr. Dobb'sJournal, May 2001, an article by Torpum Jannak, “Java 2 GraphicsRendering: an Architecture for Extreme Animation,” Dr. Dobb's Journal,September 1999, and an article by John Calcote, “Thread Pools and ServerPerformance: Thread Pools Can Save CPU Cycles,” Dr. Dobb's Journal, July1997. However, none of the above-mentioned patents or articles involveredundant servers, and none offer high-availability solutions.

In considering the performance of client-server applications,reliability and availability are very important in some environments.Where reliability and availability are important, it is preferable toavoid dependence on a single component such as a server. That singleserver could be a single point of failure, a point where a malfunctionwould disable a larger system. Thus there is a need for systems andmethods that provide client-server applications with highly availableservices, where single points of failure are avoided.

SUMMARY OF THE INVENTION

An example of a solution to problems mentioned above comprises:providing a connection pool, said connection pool including a connectionfor each of a plurality of servers; applying a load-balancing policy tosaid connection pool; and assigning a connection from said connectionpool to a client, according to said load-balancing policy. Anotherexample of a solution comprises: providing a plurality of directoryservers; providing a connection pool, said connection pool including aconnection for each of said plurality of directory servers; applying aload-balancing policy to said connection pool; and assigning aconnection from said connection pool to a client, according to saidload-balancing policy.

BRIEF DESCRIPTION OF THE DRAWINGS

A better understanding of the present invention can be obtained when thefollowing detailed description is considered in conjunction with thefollowing drawings. The use of the same reference symbols in differentdrawings indicates similar or identical items.

FIG. 1 illustrates a simplified example of a computer system capable ofperforming the present invention.

FIG. 2 is a high-level block diagram illustrating an example of a systemand method for providing highly available services, according to theteachings of the present invention.

FIG. 3 is a flow chart illustrating an example of a load-balancingmethod.

FIG. 4 is a flow chart illustrating an example of a monitoring method.

DETAILED DESCRIPTION

The examples that follow involve the use of one or more computers andmay involve the use of one or more communications networks. The presentinvention is not limited as to the type of computer on which it runs,and not limited as to the type of network used. Some of the examplesthat follow have been implemented by using object-oriented programmingwith the JAVA programming language; however, the invention could beimplemented with another programming language. Various operating systemscould be used. Some of the examples that follow have been implementedfor providing highly-available services to web application serversoftware. More particularly, in an example implementation, a securityfunction for a web application server used the JAVA Naming and DirectoryInterface (JNDI) to communicate with directory servers that utilizedLightweight Directory Access Protocol (LDAP). In this example, asecurity function for a web application server accessed directoryservers to perform a search or authenticate a user. However, theinvention could be used in various situations involving connections toservers, where highly available services may be desired.

The following are definitions of terms used in the description of thepresent invention and in the claims:

-   “Client-server application” means any application involving a client    that utilizes a service, and a server that provides a service.    Examples of such a service include but are not limited to:    information services, transactional services, security functions,    access to databases, and access to audio or video content.-   “Component” means any element or part, and may include elements    consisting of hardware or software or both.-   “Computer-usable medium” means any carrier wave, signal or    transmission facility for communication with computers, and any kind    of computer memory, such as floppy disks, hard disks, Random Access    Memory (RAM), Read Only Memory (ROM), CD-ROM, flash ROM,    non-volatile ROM, and non-volatile memory.-   “Connection” means whatever is needed to provide communication    between a client and a server, such as a physical or wireless link,    driver software, and necessary information such as a server's name    or address, a name of a database, service provider, or directory,    and security credentials.-   “High availability” or “Highly available” refers to services or    systems that are accessible, usable, or up most of the time, or that    recover from failures quickly, perhaps involving redundant    components.-   “Storing” data or information, using a computer, means placing the    data or information, for any length of time, in any kind of computer    memory, such as floppy disks, hard disks, Random Access Memory    (RAM), Read Only Memory (ROM), CD-ROM, flash ROM, non-volatile ROM,    and non-volatile memory.

FIG. 1 illustrates a simplified example of an information handlingsystem that may be used to practice the present invention. The inventionmay be implemented on a variety of hardware platforms, includingembedded systems, personal computers, workstations, servers, andmainframes. The computer system of FIG. 1 has at least one processor110. Processor 110 is interconnected via system bus 112 to random accessmemory (RAM) 116, read only memory (ROM) 114, and input/output (I/O)adapter 118 for connecting peripheral devices such as disk unit 120 andtape drive 140 to bus 112. The system has user interface adapter 122 forconnecting keyboard 124, mouse 126, or other user interface devices suchas audio output device 166 and audio input device 168 to bus 112. Thesystem has communication adapter 134 for connecting the informationhandling system to a data processing network 150, and display adapter136 for connecting bus 112 to display device 138. Communication adapter134 may link the system depicted in FIG. 1 with hundreds or eventhousands of similar systems, or other devices, such as remote printers,remote servers, or remote storage units. The system depicted in FIG. 1may be linked to both local area networks (sometimes referred to asintranets) and wide area networks, such as the Internet.

While the computer system described in FIG. 1 is capable of executingthe processes described herein, this computer system is simply oneexample of a computer system. Those skilled in the art will appreciatethat many other computer system designs are capable of performing theprocesses described herein.

FIG. 2 is a high-level block diagram illustrating an example of a systemand method for providing highly available services, according to theteachings of the present invention. To begin with an overview, thisexample comprises: providing a connection pool 200, said connection poolincluding a connection (connections numbered 1–N, shown at 201, 202, and203) for each of a plurality of servers (servers numbered 1–N, shown at211, 212, and 213); applying a load-balancing policy (at 226) to saidconnection pool 200; and assigning a connection from said connectionpool 200 to a client 225, according to said load-balancing policy. Theremay be one or more client application(s) 225 that typically wouldinitiate communication with a server (211, 212, or 213) and request aservice of some kind. See FIG. 3 for more details on load balancing.Such an example may also include continuously managing the content ofconnection pool 200. Monitor 227 symbolizes a means for continuouslymanaging the content of connection pool 200; see FIG. 4 for moredetails. Client application(s) 225, load-balancing service 226, andmonitor 227 may be parts of a larger component 220.

Such an example may be extended to a user-registry example, with both“read” and “write” access at runtime. Consider a read-write example,with directory servers employing LDAP. LDAP servers could be categorizedinto two types. The primary type (e.g. 211 and 212) would provide both“read” and “write” access. The backup type (e.g. 213) would be typicallyused for “read” access. A “write” operation would be applied to allread-write LDAP servers (e.g. 211 and 212). An external mechanism wouldbe used to keep the read-only type of LDAP servers (e.g. 213) consistentwith those read-write LDAP servers (e.g. 211 and 212). A “read” requestcould be distributed to any of the read-write (e.g. 211 and 212) andread-only (e.g. 213) LDAP servers. In other words, this approach may beapplied to handle “read” requests for best utilization and performance.A “write” request would be sent to one read-write LDAP server (e.g. 211)or distributed to all read-write LDAP servers (e.g. 211 and 212),depending on the external synchronization mechanism, to maintainconsistency. Thus a read-write example may involve allowing a “read”operation on any of the servers (211, 212, and 213); and allowing a“write” operation on at least one of the servers (e.g. 211 and 212).

FIG. 2 may be used to describe some details of an exampleimplementation. Application servers and many other software productsperform user authentication against a user registry. User privilegeattributes, as well as other profile information, may be stored in theuser registry. A user registry may be implemented in various ways.Employing LDAP is one common way to implement a user registry, and LDAPwas employed in this example. Turning to FIG. 2, the exampleimplementation comprised: providing a plurality of directory servers(servers numbered 1–N, shown at 211, 212, and 213); providing aconnection pool 200, said connection pool 200 including a connection foreach of said plurality of directory servers; applying a load-balancingpolicy (at 226) to said connection pool 200; and assigning a connectionfrom said connection pool 200 to a client 225, according to saidload-balancing policy. Client application 225 got a connection (one ofconnections numbered 1–N, shown at 201, 202, and 203), assigned by aload-balancing service 226, to perform an operation. This exampleinvolved utilizing JNDI in providing connection pool 200. JNDI mayprovide access to a variety of services, such as access to securitycredentials, file systems, and databases. This example utilized LDAPdirectory servers (i.e. the plurality of directory servers shown at 211,212, and 213 were directory servers employing LDAP). This exampleinvolved continuously managing the content of connection pool 200.Monitor 227 symbolizes a means for continuously managing the content ofconnection pool 200, such as a monitor thread; see FIG. 4 for moredetails.

Connection pool 200 can be implemented as a pool of objects. Referenceis made to an artide by Torpum Jannak, “Java 2 Graphics Rendering: anArchitecture for Extreme Animation,” Dr. Dobb's Journal, September 1999,that includes code for implementing an object pool, with reuse of theobjects.

The example implementation involved utilizing a JNDI context inproviding each connection (connections numbered 1–N, shown at 201, 202,and 203). The context contained information about one server (e.g. oneof the servers numbered 1–N, shown at 211, 212, and 213), and containedone connection to one server. The context was reusable. A JNDI contextobject provides methods such as a “bind” method that binds a name to anobject. The example implementation utilized the JNDI DirContext class, asubclass of the context class, that provides methods for directoryservices. Reference is made to the articles by Todd Sunsted, “JNDIOverview, Parts 1–4,” Java World, January, February, and March 2000,that provide detailed information about using JNDI and LDAP. Inparticular, reference is made to Sunsted's “JNDI Overview, Part3:Advanced JNDI,” Java World, March 2000 that includes code for connectingto an LDAP server. Also, reference is made to Sunsted's “JNDI Overview,Part 4: The Doc-u-matic, a JNDI Application,” Java World, March 2000that includes code for binding objects and looking up objects from adirectory service.

The example implementation scaled very well, and worked well withvarious JNDI implementations. The example implementation provided ahighly-available LDAP user registry, and it provided improvedperformance compared with a user registry with a single LDAP server.

LDAP is a popular protocol employed in the above-mentioned example. LDAPmay be used to provide information stored in a directory (such asinformation about people, information about servers and services, andaccess controls). When this kind of information is required, the presentinvention may well be employed. Many implementations of LDAP areavailable, such as the software product sold under the trademark SECUREWAY DIRECTORY by IBM, the software product sold under the trademarkLOTUS DOMINO SERVER, or open source software known as Open LDAP. Thesoftware product sold under the trademark ACTIVE DIRECTORY by MICROSOFTand the software product sold under the trademark NETSCAPE DIRECTORYSERVER are other implementations of LDAP. The product sold under thetrademark NOVELL DIRECTORY SERVICE is compatible with LDAP.

Some alternative naming services to consider are: the Domain Name System(DNS), the Internet's naming service, and Common Object Services (COS)naming, that allows applications to store and access references toCommon Object Request Broker Architecture (CORBA) objects.

FIG. 3 is a flow chart illustrating an example of a load-balancingmethod. To begin with an overview, this example involves receiving aclient's request for a connection to a server (block 305), applying aload-balancing policy to a connection pool (blocks 320–325); andassigning a connection from said connection pool to a client (block330), according to said load-balancing policy. This example alsoinvolves monitoring said connection pool for failures (decision 335),removing from said connection pool a connection to a failed server(block 340), and adding connections to said connection pool (block 315).

FIG. 3 may be used to describe some details of an exampleimplementation, in which there was a pool of connections, one connectionfor each operational LDAP server. Connections were implemented with JNDIcontexts. Load balancing was implemented above the JNDI interface. Aclient application got a DirContextfrom a load-balancing service toperform an operation. FIG. 3 begins with waiting for a request, block300. JNDI lookup and binding requests (“receive requests,” block 305)were distributed to operational LDAP servers. If no server wasavailable, the “No” branch was taken at decision 310, and connections tooperational servers would be created if possible, at block 315. Then thepath loops back to the path above decision 310. On the other hand, if atleast one server was available, the function of recovering connectionsto operational servers was left to a monitor thread (see FIG. 4). If atleast one server was available, the “Yes” branch was taken at decision310, and next a load-balancing policy was used to choose a server, atblock 320, choose a corresponding connection, block 325, and assign theconnection to the client, block 330. If a server's status was “Down,” itwould not be chosen.

Requests were distributed to operational LDAP servers, based on aconfigurable load-balancing policy (blocks 320, 325, and 330). Theload-balancing policy could be round robin, weighted round-robin, orother kinds of policies. For example, the policy could distributerequests equally, or more weight could be placed on a faster server. Aconnection pool and a server list were implemented with hashtables. Ahashtable is an object that is like a dictionary. It is a set ofkey/value pairs. For the connection pool hashtable, the key was an LDAPserver's uniform resource locator (URL), and the value was the context.For the server list hashtable, the key was an LDAP server's URL, and thevalue was the server's status.

If an operation failed, the “No” branch was taken at decision 335. Thenat block 340, that server's status was changed to “down,” and thatserver's connection was removed from the connection pool. Then the pathloops back to the path above decision 310. There would be three tries toget a connection to an operational server. On the other hand, if anoperation was successful, the “Yes” branch was taken at decision 335.The connection was available for reuse (block 345). Then the path loopsback to block 300. The example implementation reused the same context.

FIG. 4 is a flow chart illustrating an example of a monitoring method.This is a simplified example of continuously managing the content of aconnection pool. To begin with an overview, managing the content maycomprise one or more actions such as monitoring a connection pool forfailures (block 420 and decision 430), removing from said connectionpool a connection to a failed server (block 440), and adding a goodconnection to said connection pool, when a server becomes available (notshown in FIG. 4).

In an example implementation, a connection pool was managed by a monitorthread that periodically woke up, performed management functions (someof which are shown in FIG. 4), and then slept for a defined period. Themonitor period was adjustable via a system-management graphical userinterface. The monitor thread's cycle could be summarized as: (a) tryingto connect to one or more servers that were previously down; (b)checking the availability of one or more servers that were previouslyup; (c) waiting for a defined interval; and (d) repeating (a)–(c) above.Before the first block in FIG. 4, the actions of waking up and trying toconnect to one or more servers that were previously down could beperformed. If a connection was made, that connection would be added tothe pool. For each connection in the pool (beginning at block 400), ifthe connection was accessed recently (during the previous sleep period),the “Yes” branch was taken at decision 410. The monitor thread would notping (check the availability of) the corresponding server if aconnection was accessed recently. This avoided unnecessary pinging andavoided adding traffic to a busy system. Looping back to block 400, themonitor thread checked the next connection on the list. If on the otherhand, the connection was not accessed during the previous sleep period,the “No” branch was taken at decision 410. Then the monitor thread wouldping (check the availability of) the corresponding server (block 420).If the server or connection had failed, there was no response, and the“No” branch was taken at decision 430. At block 440, that server'sstatus was changed to “down,” and that server's connection was removedfrom said connection pool. Looping back to block 400, the monitor threadchecked the next connection on the list. If on the other hand, there wasa response to the ping, the “Yes” branch was taken at decision 430. Theconnection was available for reuse (block 445). Looping back to block400, the monitor thread checked the next connection on the list.

Those skilled in the art will recognize that blocks in theabove-mentioned flow charts could be arranged in a somewhat differentorder, but still describe the invention. Blocks could be added to theabove-mentioned low charts to describe details, or optional features;some blocks could be subtracted to show a simplified example.

In conclusion, we have shown examples of methods and systems to providehighly available services.

One of the possible implementations of the invention is an application,namely a set of instructions (program code) executed by a processor of acomputer from a computer-usable medium such as a memory of a computer.Until required by the computer, the set of instructions may be stored inanother computer memory, for example, in a hard disk drive, or in aremovable memory such as an optical disk (for eventual use in a CD ROM)or floppy disk (for eventual use in a floppy disk drive), or downloadedvia the Internet or other computer network. Thus, the present inventionmay be implemented as a computer-usable medium havingcomputer-executable instructions for use in a computer. In addition,although the various methods described are conveniently implemented in ageneral-purpose computer selectively activated or reconfigured bysoftware, one of ordinary skill in the art would also recognize thatsuch methods may be carried out in hardware, in firmware, or in morespecialized apparatus constructed to perform the required method steps.

While the invention has been shown and described with reference toparticular embodiments thereof, it will be understood by those skilledin the art that the foregoing and other changes in form and detail maybe made therein without departing from the spirit and scope of theinvention. The appended claims are to encompass within their scope allsuch changes and modifications as are within the true spirit and scopeof this invention. Furthermore, it is to be understood that theinvention is solely defined by the appended claims. It will beunderstood by those with skill in the art that if a specific number ofan introduced claim element is intended, such intent will be explicitlyrecited in the claim, and in the absence of such recitation no suchlimitation is present. For non-limiting example, as an aid tounderstanding, the appended claims may contain the introductory phrases“at least one” or “one or more” to introduce claim elements. However,the use of such phrases should not be construed to imply that theintroduction of a claim element by indefinite articles such as “a” or“an” limits any particular claim containing such introduced claimelement to inventions containing only one such element, even when thesame claim includes the introductory phrases “at least one” or “one ormore” and indefinite articles such as “a” or “an;” the same holds truefor the use in the claims of definite articles.

1. A method for providing highly available services, said methodcomprising: providing a connection pool, said connection pool includinga connection for each of a plurality of servers, wherein the connectionpool comprises a pool of reusable connection context objects, eachreusable connection context object containing information about anassociated server in the plurality of servers; applying a load-balancingpolicy to said connection pool; assigning a reusable connection contextobject from said connection pool to a client, according to saidload-balancing policy, in response to a request from the client; andmanaging a content of the connection pool, wherein managing the contentof the connection pool comprises periodically waking a connection poolmanagement thread that, for each connection in the connection pool:determines if the connection in the connection pool was accessed duringa previous sleep period of the connection pool management thread; checksavailability of a server associated with the connection if theconnection was not accessed during a previous sleep period of theconnection pool management thread; maintains a reusable connectioncontext object associated with the connection in the connection pool ifthe connection was accessed during the previous sleep period of theconnection pool management thread or the check of the availability ofthe server results in an indication that the server is available; andremoves the reusable connection context object associated with theconnection from the connection pool if the check of the availabilityresults in an indication that the server is not available.
 2. The methodof claim 1, wherein the connection pool management thread further:attempts to connect to at least one server of said plurality of serversthat has a status indicating it was previously unavailable; determiningif a connection to the at least one server of said plurality of serversthat has a status indicating it was previously unavailable issuccessfully made; and adding a reusable connection context object tothe connection pool for the at least one sewer if the connection issuccessfully made.
 3. The method of claim 1, further comprising:detecting a failed operation; changing a status of a server thatcorresponds to the assigned reusable connection context object; andassigning another reusable connection context object from saidconnection pool to said client.
 4. The method of claim 1, wherein saidapplying a load-balancing policy further comprises: allowing a “read”operation on any of said plurality of servers; and allowing a “write”operation on at least one of said plurality of servers, that isdesignated for “read” and “write” operations.
 5. The method of claim 1,further comprising: determining if at least one server in the pluralityof servers is currently available to handle a request from the client;and creating one or more reusable connection context objects in theconnection pool for operational servers in the plurality of servers ifno server is currently available to handle the request from the client.6. The method of claim 1, wherein providing a connection pool furthercomprises: providing a connection pool hashtable, wherein a key for theconnection pool hashtable is a uniform resource locator of the serversin the plurality of servers and a value for the connection poolhashtable is a context for the servers in the plurality of servers.
 7. Amethod for providing highly available services, said method comprising:providing a plurality of directory servers; providing a connection pool,said connection pool including a connection for each of said pluralityof directory servers, wherein the connection pool comprises a pool ofreusable connection context objects, each reusable connection contextobject containing information about an associated directory server inthe plurality of directory servers; applying a load-balancing policy tosaid connection pool; assigning a reusable connection context objectfrom said connection pool to a client, according to said load-balancingpolicy, in response to a request from the client; and managing a contentof the connection pool, wherein managing the content of the connectionpool comprises periodically waking a connection pool management threadthat, for each connection in the connection pool: determines if theconnection in the connection pool was accessed during a previous sleepperiod of the connection pool management thread; checks availability ofa server associated with the connection if the connection was notaccessed during a previous sleep period of the connection poolmanagement thread; maintains a reusable connection context objectassociated with the connection in the connection pool if the connectionwas accessed during the previous sleep period of the connection poolmanagement thread or the check of the availability of the server resultsin an indication that the server is available; and removes the reusableconnection context object associated with the connection from theconnection pool if the check of the availability results in anindication that the server is not available.
 8. The method of claim 7,wherein the connection pool management thread further: attempts toconnect to at least one server of said plurality of servers that has astatus indicating it was previously unavailable; determining if aconnection to the at least one server of said plurality of servers thathas a status indicating it was previously unavailable is successfullymade; and adding a reusable connection context object to the connectionpool for the at least one server if the connection is successfully made.9. The method of claim 7, further comprising: detecting a failedoperation; changing a status of a server that corresponds to theassigned reusable connection context object; and assigning anotherreusable connection context object from said connection pool to saidclient.
 10. The method of claim 7, wherein context information in thereusable connection context objects is JNDI context information.
 11. Themethod of claim 7, wherein said plurality of directory servers includesa plurality of directory servers utilizing LDAP.
 12. The method of claim7, wherein: said plurality of directory servers includes: at least onedirectory server for “read” and “write” operations; and at least onedirectory server for “read” operations; and said applying aload-balancing policy further comprises: allowing a “write” operation onsaid at least one directory server for “read” and “write” operations;and allowing a “read” operation on any of said plurality of directoryservers.
 13. The method of claim 7, further comprising: determining ifat least one server in the plurality of servers is currently availableto handle a request from the client; and creating one or more reusableconnection context objects in the connection pool for operationalservers in the plurality of servers if no server is currently availableto handle the request from the client.
 14. The method of claim 7,wherein providing a connection pool further comprises: providing aconnection pool hashtable, wherein a key for the connection poolhashtable is a uniform resource locator of the servers in the pluralityof servers and a value for the connection pool hashtable is a contextfor the servers in the plurality of servers.
 15. A system for providinghighly available services, said system comprising: means for providing aconnection pool, said connection pool including a connection for each ofa plurality of servers, wherein the connection pool comprises a pool ofreusable connection context objects, each reusable connection contextobject containing information about an associated directory server inthe plurality of directory servers; means for applying a load-balancingpolicy to said connection pool; means for assigning a reusableconnection context object from said connection pool to a client,according to said load-balancing policy, in response to a request fromthe client; and means for managing a content of the connection pool,wherein the means for managing the content of the connection poolcomprises means for periodically waking a connection pool managementthread that, for each connection in the connection pool: determines ifthe connection in the connection pool was accessed during a previoussleep period of the connection pool management thread; checksavailability of a server associated with the connection if theconnection was not accessed during a previous sleep period of theconnection pool management thread; maintains a reusable connectioncontext object associated with the connection in the connection pool ifthe connection was accessed during the previous sleep period of theconnection pool management thread or the check of the availability ofthe server results in an indication that the server is available: andremoves the reusable connection context object associated with theconnection from the connection pool if the check of the availabilityresults in an indication that the server is not available.
 16. Thesystem of claim 15, wherein the connection pool management threadfurther; attempts to connect to at least one server of said plurality ofservers that has a status indicating it was previously down unavailable;determining if a connection to the at least one server of said pluralityof servers that has a status indicating it was previously unavailable issuccessfully made; and adding a reusable connection context object tothe connection pool for the at least one server if the connection issuccessfully made.
 17. The system of claim 15, further comprising: meansfor detecting a failed operation; means for changing a status of aserver that corresponds to the assigned reusable connection contextobject; and means for assigning another reusable connection contextobject from said connection pool to said client.
 18. The system of claim15, wherein said means for applying a load-balancing policy furthercomprises: means for allowing a “read” operation on any of saidplurality of servers; and means for allowing a “write” operation on atleast one of said plurality of servers, that is designated for “read”and “write” operations.
 19. The system of claim 15, further comprising:means for determining if at least one server in the plurality of serversis currently available to handle a request from the client; and meansfor creating one or more reusable connection context objects in theconnection pool for operational servers in the plurality of servers ifno server is currently available to handle the request from the client.20. The system of claim 15, wherein the means for providing a connectionpool further comprises: means for providing a connection pool hashtable,wherein a key for the connection pool hashtable is a uniform resourcelocator of the servers in the plurality of servers and a value for theconnection pool hashtable is a context for the servers in the pluralityof servers.
 21. A computer-usable medium having computer-executableinstructions for providing highly available services, saidcomputer-executable instructions comprising: means for providing aconnection pool, said connection pool including a connection for each ofa plurality of servers, wherein the connection pool comprises a pool ofreusable connection context objects, each reusable connection contextobject containing information about an associated directory server inthe plurality of directory servers; means for applying a load-balancingpolicy to said connection pool; and means for assigning a reusableconnection context object from said connection pool to a client,according to said load-balancing policy, in response to a request fromthe client; and means for managing a content of the connection pool,wherein the means for managing the content of the connection poolcomprises means for periodically waking a connection pool managementthread that, for each connection in the connection pool: determines ifthe connection in the connection pool was accessed during a previoussleep period of the connection pool management thread; checksavailability of a server associated with the connection if theconnection was not accessed during a previous sleep period of theconnection pool management thread; maintains a reusable connectioncontext object associated with the connection in the connection pool ifthe connection was accessed during the previous sleep period of theconnection pool management thread or the check of the availability ofthe server results in an indication that the server is available; andremoves the reusable connection context object associated with theconnection from the connection pool if the check of the availabilityresults in an indication that the server is not available.
 22. Thecomputer-usable medium of claim 21, wherein the connection poolmanagement thread further: attempts to connect to at least one server ofsaid plurality of servers that has a status indicating it was previouslyunavailable; determining if a connection to the at least one server ofsaid plurality of servers that has a status indicating it was previouslyunavailable is successfully made; and adding a reusable connectioncontext object to the connection pool for the at least one server if theconnection is successfully made.
 23. The computer-usable medium of claim21, further comprising: means for detecting a failed operation; meansfor changing a stats of a server that corresponds to the assignedreusable connection context object; and means for assigning anotherreusable connection context object from said connection pool to saidclient.
 24. The computer-usable medium of claim 21, wherein said meansfor applying a load-balancing policy further comprises: means forallowing a “read” operation on any of said plurality of servers; andmeans for allowing a “write” operation on at least one of said pluralityof servers, that is designated for “read” and “write” operations. 25.The computer usable medium of claim 21, wherein said computer-executableinstructions further comprise: means for determining if at least oneserver in the plurality of servers is currently available to handle arequest from the client; and means for creating one or more reusableconnection context objects in the connection pool for operationalservers in the plurality of servers if no server is currently availableto handle the request from the client.
 26. The computer usable medium ofclaim 21, wherein the means for providing a connection pool furthercomprises: means for providing a connection pool hashtable, wherein akey for the connection pool hashtable is a uniform resource locator ofthe servers in the plurality of servers and a value for the connectionpool hashtable is a context for the servers in the plurality of servers.